import useActivityStore from '@/store/modules/activity'
import { getActivityType } from '@/api/system/activity'

/**
 * 获取字典数据
 */
export  function useActivityType() {
    const res = ref({});
    return (() => {
        res.value= [];
        const acts = useActivityStore().getType();
        if (acts) {
            res.value = dicts;
        } else {
            getActivityType().then(resp => {
                res.value = resp.data
                useActivityStore().setType(res.value);
            })
        }
        return toRefs(res.value);
    })()
}